import request from '@/utils/request'

// 查询异常数据列表
export function listBiAbnormalData(query) {
  return request({
    url: '/abnormal/BiAbnormalData/list',
    method: 'get',
    params: query
  })
}
// 上传文件
export function importDataCheck(data) {
  return request({
    url: '/abnormal/BiAbnormalData/importDataCheck',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, // 这句很重要，以formData的方式上传
    data: data.file,
    params:data.dataForm,
  })
}
// 查询异常数据详细
export function getBiAbnormalData(id) {
  return request({
    url: '/abnormal/BiAbnormalData/' + id,
    method: 'get'
  })
}

// 新增异常数据
export function addBiAbnormalData(data) {
  return request({
    url: '/abnormal/BiAbnormalData',
    method: 'post',
    data: data
  })
}

// 修改异常数据
export function updateBiAbnormalData(data) {
  return request({
    url: '/abnormal/BiAbnormalData',
    method: 'put',
    data: data
  })
}

// 删除异常数据
export function delBiAbnormalData(id) {
  return request({
    url: '/abnormal/BiAbnormalData/' + id,
    method: 'delete'
  })
}
